package com.qianfeng.web;

import com.qianfeng.chaoshi.bean.Users;
import com.qianfeng.hunan.bean.Menu;
import com.qianfeng.service.QianFengService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 2019/12/7
 * Administrator
 * springboot1207
 * 面向对象面向君  不负代码不负卿
 */
@RestController
public class JpaController {
    @Autowired
    private QianFengService qianFengService;
    @RequestMapping("getjpa")
    public Map getjpa(){
        HashMap map = new HashMap();
        List<Menu> menus = qianFengService.findMenus();
        List<Users> users = qianFengService.findusers();
        map.put("us",users);
        map.put("ms",menus);
        return map;
    }
}
